package com.ghpt.service.impl;
import com.ghpt.mapper.DiReMapper;
import com.ghpt.pojo.DiRe;
import com.ghpt.service.DiReService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DiReServiceImpl  implements DiReService {
    @Autowired
    private DiReMapper diReMapper;

    @Override
    public DiRe findDiReById(Long id) {
        if (id != null) {
            return diReMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(DiRe diRe) {
        return diReMapper.updateById(diRe);//更新成功为1否则为0
    }
}
